<?php
/**
 *    Copyright 2010 Show Framework(www.showframework.cn)
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 * 
 *        http://www.apache.org/licenses/LICENSE-2.0
 * 
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

/**
 * 控制器接口
 * 
 * @package Show_Controller
 * @name Show_Controller_Interface
 * @author show
 * @since v0.6
 */
interface Show_Controller_Interface
{
    /**
     * 初始化控制器
     * 控制器必须被初始化，哪怕你什么都不做
     * 可以在初始化函数中设置视图、模型等或者登陆验证等
     * 
     * @return void
     */
    public function init();
    
    /**
     * 设置视图
     * 参数必须是 Show_View_Interface 的实例
     * 即必须是实现 Show_View_Interface 接口的一个类，或者这个类的子类
     *
     * @param Show_View_Interface $view 视图实例
     * @return void
     */
    public function setView(Show_View_Interface $view);
}
?>